-
Notifications
You must be signed in to change notification settings - Fork 0
Working2 #56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Working2 #56
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
implementation.
- Implemented the `multiply(Matrix4)` method in the `Vector4f` class to perform matrix-vector multiplication. - Added JavaDoc to describe the method's behavior, mathematical operation, and usage. - Created comprehensive unit tests to verify the correctness of the method using various transformation matrices and vectors. - Initialized matrices using one-dimensional float arrays for consistency and readability in the tests.
- Implemented `toVector3f()` in `Vector4f` to convert a 4D vector into a 3D vector by discarding the w-component. - Included detailed JavaDoc explaining the conversion logic. - Added unit tests to verify correctness with positive, negative, and zero values.
- Implemented divideByW() method to create and return a new Vector4f by dividing the vector components by 'w' and setting 'w' to 1.0f, with exception handling for division by zero. - Implemented divideByWLocal() method to modify the current vector in place by dividing the components by 'w' and setting 'w' to 1.0f, with exception handling for division by zero. - Added unit tests to ensure correct functionality: - Test for divideByW() that verifies the original vector is untouched and a new instance is returned. - Test for divideByWLocal() that checks the modification of the original vector in place. - Test for division by zero that asserts an exception is thrown in both methods when 'w' is zero. These methods improve handling of homogeneous coordinates in 3D vectors.
- Corrected the `calculateAngleBetweenPoints()` method to properly compute the incremental angle step between vertices. - Adjusted the vertex creation loop to apply the `startAngle` offset during vertex placement. - Ensured accurate vertex placement along the arc, fixing unexpected results for non-default angles. - Added a validation check to ensure the vertex count is at least 2. This fix resolves issues with improper vertex placement when creating arcs with custom start and end angles.
the center point of the generated arc.
- Added `getMoveSpeed()` to retrieve the current movement speed. - Added `setMoveSpeed(float moveSpeed)` to update the movement speed dynamically. - Enables runtime customization of camera movement speed.
JavaDoc to the FlyByCameraControl class. These methods provide access to the mouseSensitivity field, allowing for dynamic adjustment of camera rotation speed. This is useful for user preference settings or in-game adjustments.
only once at the end. This improves efficiency by reducing redundant calculations after camera and transform updates.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.